Network devices often include and/or utilize shared resources, such as ports shared by multiple packet flows, such as flows corresponding to different packet classes. The shared resource can typically be accessed by only one user of the shared resource, such as only one packet flow, at any given time. A scheduler is typically coupled to the shared resource and is responsible for scheduling and granting access to the shared resource to the users of the shared resource. Some users of the shared resource require or desire periodic scheduling in which a fixed time interval needs to be maintained between two consecutive accesses to the shared resource. Other users of the shared resource, such as other packet flows, do not have the periodic and/or fixed time interval requirement.
Many network devices are configured to provide different quality of service (QoS) or priority levels for different types/classes of traffic. When processing packets associated with a particular traffic class, for example, a network device may ensure that transmission latency is below a certain threshold, ensure that the drop/loss rate is below a certain threshold, apply “best efforts,” etc. The QoS level for a particular packet can be important, for example, when multiple packets are to be granted access to a shared resource, such as when the packets are to be forwarded to single egress port of a network device (e.g., a bridge), and therefore must contend for access to the egress port. In some network devices, each egress port is associated with multiple queues associated with various QoS levels, and a scheduler determines the order in which packets associated with the different queues/QoS levels are sent to the egress port for transmission over the network.